package com.xgimi.open.skill.datamanager.domain.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xgimi.open.skill.datamanager.domain.entity.SpeechRuleDO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author coderzpw.zhang
 * @description 针对表【speech_rule(说法规则表)】的数据库操作Mapper
 * @createDate 2023-02-23 13:31:56
 * @Entity com.xgimi.open.skill.datamanager.domain.entity.SpeechRuleDO
 */
public interface SpeechRuleMapper extends BaseMapper<SpeechRuleDO> {
    @Delete("<script>"
            + "delete from speech_rule where intent_id in"
            + "<foreach item='intentId' index='index' collection='intentIds'   open='(' separator=',' close=')'>"
            + "#{intentId}"
            + "</foreach>"
            + "</script>")
    Boolean physicalDeleteByIntentIds(@Param("intentIds") List<Long> intentIds);
}




